<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>{pboot:pagetitle}</title>
    <meta name="keywords" content="{pboot:pagekeywords}" />
    <meta name="description" content="{pboot:pagedescription}" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="{pboot:sitetplpath}/static/css/bootstrap.min_1.css">

    <link rel="stylesheet" href="{pboot:sitetplpath}/static/css/jquery.validator.css">
    <link href="{pboot:sitetplpath}/static/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <link rel="stylesheet" href="{pboot:sitetplpath}/static/css/app.css">
    <link rel="stylesheet" href="{pboot:sitetplpath}/static/css/slick.css">
    <link rel="stylesheet" href="{pboot:sitetplpath}/static/css/main.css">
    <link href="{pboot:sitetplpath}/static/css/headcss.css" rel="stylesheet" media="screen" type="text/css" />
    <link href="{pboot:sitetplpath}/static/css/website86.css" rel="stylesheet" media="screen" type="text/css" />
    <link rel="stylesheet" href="{pboot:sitetplpath}/static/css/font_3991930_edxvrbb5j64.css">
    <link href="{pboot:sitetplpath}/static/css/iconfont_case.css" rel="stylesheet" media="screen" type="text/css" />
    <script src="{pboot:sitetplpath}/static/js/jquery.min.js"></script>
    <script src="{pboot:sitetplpath}/static/js/slick.min.js"></script>


</head>

<body>

    {include file=header.html}

    <div class="page-banner">
        {pboot:slide gid=6 num=1}
        <img src="./[slide:pic]">
        {/pboot:slide}
    </div>

    <div class="conbg1">
        <div class="clearfix">

            <div class="page-wrap-right">
                <div class="content">

                    <script src="{pboot:sitetplpath}/static/js/distpicker.js"></script>
                    <style>
                        .boxas {
                            display: none;
                        }

                        .conbg1 {
                            background: #f1f1f1;
                            padding-top: 4vw;
                        }
                    </style>
                    <div class="msg_v1">
                        <div class="msg_a1">
                            <div class="titla_aas">
                                <b>0</b>
                                <div class="wegga_aa">
                                    <h2>元预约设计</h2>
                                    <p>Reservation design</p>
                                </div>
                            </div>
                            <div class="message1">
                                <div id="message_main">
                                    <div class="gga_smsg">
                                        <div class="mga_a1a">
                                            <div class="la_aa"> 
                                                <input id="contacts" name="contacts" type="text" class="m_input" placeholder="输入您的姓名" />
                                            </div>
                                            <div class="la_aa"> 
                                                <input id="mobile" name="mobile" type="text" class="m_input" placeholder="输入您的电话" />
                                            </div>

                                        </div>
                                        <div class="mga_a1b">
                                            <div data-toggle="distpicker" class="mga_a1bas">
                                                <select data-province="---- 选择省份 ----" id="province" name="province"></select>
                                                <select data-city="---- 选择城市 ----" id="city" name="city"></select>
                                                <select data-district="---- 选择区域 ----" id="area" name="area"></select>
                                            </div>
                                        </div>
                                        <div class="mga_a1c">
                                            <div class="la_aa"> 
                                                <input id="address" name="address" type="text" class="m_input" placeholder="输入地址：市区、街道、门牌号" />
                                            </div>
                                        </div>
                                        <div id="code">
                                            <div class="la_aa"><input id="checkcode" name="checkcode" type="text" class="m_input" placeholder="验证码"/></div>
                                            <img id="yzm" src="{pboot:checkcode}" />
                                            <a href="javascript:void(0)" id="change_code" onclick="changeYzm()">换一张</a>                                                                                
                                        </div>
                                        <div class="hgha_jsgdd">
                                            <input type="submit" class="msgbtn submits" name="btn" value="立刻预约" />
                                        </div>
                                    </div>

                                </div>
                            </div>

                        </div>
                        <div class="msg_a2">
                            <ul class="xw_ahhshhs">
                                <li><a href="javascript:;">免费预约</a>
                                    <i><img src="{pboot:sitetplpath}/static/picture/ajhgjhg.png" /></i>
                                </li>
                                <li><a href="javascript:;">免费上门量尺</a><i><img
                                            src="{pboot:sitetplpath}/static/picture/ajhgjhg.png" /></i></li>
                                <li><a href="javascript:;">免费出3D全屋效果图</a></li>
                            </ul>
                        </div>
                    </div>

                </div>
            </div>


        </div>
    </div>


    {include file=footer.html}



    <script>
        function changeYzm(){
            document.getElementById('yzm').src='{pboot:checkcode}?'+Math.round(Math.random()*10)
        }
        $(".submits").click(function() {
            var name = $('input[name=contacts]').val();
            var tel = $('input[name=mobile]').val();
            var province = $('#province').val();
            var city = $('#city').val();
            var area = $('#area').val();
            var address = $('#address').val();
            var checkcode=$('input[name=checkcode]').val();
            if (name == '') {
                alert("姓名不能为空");
                return false;
            }
            if (tel == '') {
                alert("电话不能为空");
                return false;
            }
            if (!tel.match(/^([0-9]){6,}$/)) {
                alert('请正确填写手机号');
                return false;
            };
            $.ajax({
                type: "POST",
                url: '{pboot:msgaction}',
                data: {
                    "contacts": name,
                    "mobile": tel,
                    "address": province+'/'+city+'/'+area+' '+address,
                    "checkcode":checkcode,
                    "appid": '{pboot:appid}',
                    "timestamp": '{pboot:timestamp}',   
                    "signature": '{pboot:signature}' 
                },
                dataType: "json",
                success: function(result) {
                    changeYzm()
                    if (result.code == 1) {
                        alert(result.data);
                        $('input[name=mobile]').val('')
                    } else if (result.code == 0) {
                        alert(result.data);
                    } else {
                        alert("提交错误，请稍后再试");
                    }
                }
            });
        });
    </script>


</body>

</html>